Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aa/cdh: make agent-config path configurable by env #429

Merged

Conversation

mkulke
Copy link
Contributor

@mkulke mkulke commented Jan 8, 2024

relates-to: confidential-containers/cloud-api-adaptor#1637

Since peerpods will template the agent-config.toml with aa_kbc_params and /etc might be on a read-only volume, we need to make this path configurable.

@mkulke
Copy link
Contributor Author

mkulke commented Jan 8, 2024

cc @stevenhorsman @bpradipt

@mkulke mkulke force-pushed the mkulke/add-agent-config-path-env branch 3 times, most recently from 9d36ccc to a124e80 Compare January 8, 2024 17:55
mkulke added a commit to mkulke/cloud-api-adaptor that referenced this pull request Jan 9, 2024
fixes: confidential-containers#1637

blocked-by: confidential-containers/guest-components#429

On a podvm using an guest-components build from the PR,
`KATA_AGENT_CONFIG_PATH` is set and picked up by attestation-agent and
cdh:

```bash
$ cat /proc/$(pgrep -i attest)/environ | xargs --null echo
LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin SYSTEMD_SULOGIN_FORCE=1 INVOCATION_ID=ad04b8c4ff6c4f2c8617dfcfed24c183 JOURNAL_STREAM=8:3090 SYSTEMD_EXEC_PID=552 KATA_AGENT_CONFIG_PATH=/run/peerpod/agent-config.toml RUST_BACKTRACE=full OCICRYPT_KEYPROVIDER_CONFIG=/tmp/ocicrypt_config.json
```

Signed-off-by: Magnus Kulke <[email protected]>
Copy link
Member

@Xynnn007 Xynnn007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lgtm. However we might want to let CDH to have its own launch configuration file to set aa_params etc. #431

In this way, both peerpod and kata-cc could share a same interface for CDH.

attestation-agent/lib/src/token.rs Outdated Show resolved Hide resolved
attestation-agent/lib/src/token.rs Show resolved Hide resolved
relates-to: confidential-containers/cloud-api-adaptor#1637

Since peerpods will template the agent-config.toml with aa_kbc_params
and /etc might be on a read-only volume, we need to make this path
configurable.

Signed-off-by: Magnus Kulke <[email protected]>
@mkulke
Copy link
Contributor Author

mkulke commented Jan 10, 2024

This lgtm. However we might want to let CDH to have its own launch configuration file to set aa_params etc. #431

In this way, both peerpod and kata-cc could share a same interface for CDH.

I think we want to look at a consolidated/consistent way of doing configuration in guest-components eventually, but I would wait for the init-data concept to be finalized to start with that.

This is more like a band-aid for the moment, since a hardcoded path doesn't work with a setup in which /etc isn't writeable. kata-agent on CCv0 is frozen atm and will be for some months probably, env is a way to pass the configuration from kata-agent to CDH & AA without altering kata-agent itself.

@mkulke mkulke force-pushed the mkulke/add-agent-config-path-env branch from a124e80 to 5632b6c Compare January 10, 2024 13:40
@fitzthum fitzthum merged commit f20d4b5 into confidential-containers:main Jan 11, 2024
10 checks passed
@mkulke mkulke deleted the mkulke/add-agent-config-path-env branch January 11, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants